﻿<Activity mc:Ignorable="sap sap2010 sads" x:Class="MyNet.QueryWorkflows.Operators.Union"
 xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities"
 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
 xmlns:mca="clr-namespace:Microsoft.CSharp.Activities;assembly=System.Activities"
 xmlns:mwd="clr-namespace:MyNet.WebServices.DataModel;assembly=MyNet.WebServices"
 xmlns:sads="http://schemas.microsoft.com/netfx/2010/xaml/activities/debugger"
 xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation"
 xmlns:sap2010="http://schemas.microsoft.com/netfx/2010/xaml/activities/presentation"
 xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib"
 xmlns:sco="clr-namespace:System.Collections.ObjectModel;assembly=mscorlib"
 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <x:Members>
    <x:Property Name="leftOperand" Type="InArgument(scg:List(mwd:Contact))" />
    <x:Property Name="rightOperand" Type="InArgument(scg:List(mwd:Contact))" />
    <x:Property Name="result" Type="OutArgument(scg:List(mwd:Contact))" />
  </x:Members>
  <sap2010:ExpressionActivityEditor.ExpressionActivityEditor>C#</sap2010:ExpressionActivityEditor.ExpressionActivityEditor>
  <sap2010:WorkflowViewState.IdRef>MyNet.QueryWorkflows.Operators.Union_1</sap2010:WorkflowViewState.IdRef>
  <TextExpression.NamespacesForImplementation>
    <sco:Collection x:TypeArguments="x:String">
      <x:String>System</x:String>
      <x:String>System.Collections.Generic</x:String>
      <x:String>System.Data</x:String>
      <x:String>System.Linq</x:String>
      <x:String>System.Text</x:String>
      <x:String>MyNet.WebServices.DataModel</x:String>
    </sco:Collection>
  </TextExpression.NamespacesForImplementation>
  <TextExpression.ReferencesForImplementation>
    <sco:Collection x:TypeArguments="AssemblyReference">
      <AssemblyReference>Microsoft.CSharp</AssemblyReference>
      <AssemblyReference>System</AssemblyReference>
      <AssemblyReference>System.Activities</AssemblyReference>
      <AssemblyReference>System.Core</AssemblyReference>
      <AssemblyReference>System.Data</AssemblyReference>
      <AssemblyReference>System.Runtime.Serialization</AssemblyReference>
      <AssemblyReference>System.ServiceModel</AssemblyReference>
      <AssemblyReference>System.ServiceModel.Activities</AssemblyReference>
      <AssemblyReference>System.Xaml</AssemblyReference>
      <AssemblyReference>System.Xml</AssemblyReference>
      <AssemblyReference>System.Xml.Linq</AssemblyReference>
      <AssemblyReference>MyNet.WebServices</AssemblyReference>
      <AssemblyReference>mscorlib</AssemblyReference>
      <AssemblyReference>MyNet.QueryWorkflow</AssemblyReference>
    </sco:Collection>
  </TextExpression.ReferencesForImplementation>
  <Sequence sap2010:WorkflowViewState.IdRef="Sequence_1">
    <Sequence.Variables>
      <Variable x:TypeArguments="mwd:Contact[]" Name="lOperand">
        <Variable.Default>
          <mca:CSharpValue x:TypeArguments="mwd:Contact[]">leftOperand.ToArray()</mca:CSharpValue>
        </Variable.Default>
      </Variable>
      <Variable x:TypeArguments="mwd:Contact[]" Name="rOperand">
        <Variable.Default>
          <mca:CSharpValue x:TypeArguments="mwd:Contact[]">rightOperand.ToArray()</mca:CSharpValue>
        </Variable.Default>
      </Variable>
      <Variable x:TypeArguments="scg:List(mwd:Contact)" Name="res">
        <Variable.Default>
          <mca:CSharpValue x:TypeArguments="scg:List(mwd:Contact)">new List&lt;Contact&gt;(leftOperand.Count + rightOperand.Count)</mca:CSharpValue>
        </Variable.Default>
      </Variable>
    </Sequence.Variables>
    <ForEach x:TypeArguments="mwd:Contact" DisplayName="ForEach&lt;Contact&gt;" sap2010:WorkflowViewState.IdRef="ForEach`1_1">
      <ForEach.Values>
        <InArgument x:TypeArguments="scg:IEnumerable(mwd:Contact)">
          <mca:CSharpValue x:TypeArguments="scg:IEnumerable(mwd:Contact)">lOperand</mca:CSharpValue>
        </InArgument>
      </ForEach.Values>
      <ActivityAction x:TypeArguments="mwd:Contact">
        <ActivityAction.Argument>
          <DelegateInArgument x:TypeArguments="mwd:Contact" Name="contact" />
        </ActivityAction.Argument>
        <Sequence sap2010:WorkflowViewState.IdRef="Sequence_2">
          <Sequence.Variables>
            <Variable x:TypeArguments="mwd:Contact" Name="sharedContact" />
          </Sequence.Variables>
          <Assign sap2010:WorkflowViewState.IdRef="Assign_5">
            <Assign.To>
              <OutArgument x:TypeArguments="mwd:Contact">
                <mca:CSharpReference x:TypeArguments="mwd:Contact">sharedContact</mca:CSharpReference>
              </OutArgument>
            </Assign.To>
            <Assign.Value>
              <InArgument x:TypeArguments="mwd:Contact">
                <mca:CSharpValue x:TypeArguments="mwd:Contact">res.Find( c =&gt; c.SocialNetworkBasicInfo.SocialNetworkID == contact.SocialNetworkBasicInfo.SocialNetworkID )</mca:CSharpValue>
              </InArgument>
            </Assign.Value>
          </Assign>
          <If sap2010:WorkflowViewState.IdRef="If_1">
            <If.Condition>
              <InArgument x:TypeArguments="x:Boolean">
                <mca:CSharpValue x:TypeArguments="x:Boolean">sharedContact == null</mca:CSharpValue>
              </InArgument>
            </If.Condition>
            <If.Then>
              <InvokeMethod sap2010:WorkflowViewState.IdRef="InvokeMethod_2" MethodName="Add">
                <InvokeMethod.TargetObject>
                  <InArgument x:TypeArguments="scg:List(mwd:Contact)">
                    <mca:CSharpValue x:TypeArguments="scg:List(mwd:Contact)">res</mca:CSharpValue>
                  </InArgument>
                </InvokeMethod.TargetObject>
                <InArgument x:TypeArguments="mwd:Contact">
                  <mca:CSharpValue x:TypeArguments="mwd:Contact">contact</mca:CSharpValue>
                </InArgument>
              </InvokeMethod>
            </If.Then>
          </If>
        </Sequence>
      </ActivityAction>
    </ForEach>
    <ForEach x:TypeArguments="mwd:Contact" DisplayName="ForEach&lt;Contact&gt;" sap2010:WorkflowViewState.IdRef="ForEach`1_2">
      <ForEach.Values>
        <InArgument x:TypeArguments="scg:IEnumerable(mwd:Contact)">
          <mca:CSharpValue x:TypeArguments="scg:IEnumerable(mwd:Contact)">rOperand</mca:CSharpValue>
        </InArgument>
      </ForEach.Values>
      <ActivityAction x:TypeArguments="mwd:Contact">
        <ActivityAction.Argument>
          <DelegateInArgument x:TypeArguments="mwd:Contact" Name="contact" />
        </ActivityAction.Argument>
        <Sequence sap2010:WorkflowViewState.IdRef="Sequence_4">
          <Sequence.Variables>
            <Variable x:TypeArguments="mwd:Contact" Name="sharedContact" />
          </Sequence.Variables>
          <Assign sap2010:WorkflowViewState.IdRef="Assign_6">
            <Assign.To>
              <OutArgument x:TypeArguments="mwd:Contact">
                <mca:CSharpReference x:TypeArguments="mwd:Contact">sharedContact</mca:CSharpReference>
              </OutArgument>
            </Assign.To>
            <Assign.Value>
              <InArgument x:TypeArguments="mwd:Contact">
                <mca:CSharpValue x:TypeArguments="mwd:Contact">res.Find( c =&gt; c.SocialNetworkBasicInfo.SocialNetworkID == contact.SocialNetworkBasicInfo.SocialNetworkID )</mca:CSharpValue>
              </InArgument>
            </Assign.Value>
          </Assign>
          <If sap2010:WorkflowViewState.IdRef="If_2">
            <If.Condition>
              <InArgument x:TypeArguments="x:Boolean">
                <mca:CSharpValue x:TypeArguments="x:Boolean">sharedContact == null</mca:CSharpValue>
              </InArgument>
            </If.Condition>
            <If.Then>
              <InvokeMethod sap2010:WorkflowViewState.IdRef="InvokeMethod_4" MethodName="Add">
                <InvokeMethod.TargetObject>
                  <InArgument x:TypeArguments="scg:List(mwd:Contact)">
                    <mca:CSharpValue x:TypeArguments="scg:List(mwd:Contact)">res</mca:CSharpValue>
                  </InArgument>
                </InvokeMethod.TargetObject>
                <InArgument x:TypeArguments="mwd:Contact">
                  <mca:CSharpValue x:TypeArguments="mwd:Contact">contact</mca:CSharpValue>
                </InArgument>
              </InvokeMethod>
            </If.Then>
          </If>
        </Sequence>
      </ActivityAction>
    </ForEach>
    <Assign sap2010:WorkflowViewState.IdRef="Assign_7">
      <Assign.To>
        <OutArgument x:TypeArguments="scg:List(mwd:Contact)">
          <mca:CSharpReference x:TypeArguments="scg:List(mwd:Contact)">result</mca:CSharpReference>
        </OutArgument>
      </Assign.To>
      <Assign.Value>
        <InArgument x:TypeArguments="scg:List(mwd:Contact)">
          <mca:CSharpValue x:TypeArguments="scg:List(mwd:Contact)">res</mca:CSharpValue>
        </InArgument>
      </Assign.Value>
    </Assign>
    <sads:DebugSymbol.Symbol>d0NDOlxVc2Vyc1xKXERlc2t0b3BcY2RtXEV4NVxNeU5ldC5RdWVyeVdvcmtmbG93XE9wZXJhdG9yc1xVbmlvbi54YW1sHS8DrgEOAgEBMwszYwIBEDgLOGQCAQk9Cz2VAQIBAkEFcA8CAV9xBaABDwIBJqEBBawBDgIBF0QLRGUDAZEBSwluFAIBYHQLdGUCAVh7CZ4BFAIBJ6kBC6kBWQIBH6QBC6QBZAIBGE8LWhQCAX5bC20QAgFhfwuKARQCAUWLAQudARACAShXEVfAAQMBiAFSEVJnAgF/XhFeZQIBYmIPax4CAWuHARGHAcABAgFPggERggFnAgFGjgERjgFlAgEpkgEPmwEeAgEyZRVlYwIBdWkTaVsCAWyVARWVAWMCATyZAROZAVsCATM=</sads:DebugSymbol.Symbol>
  </Sequence>
  <sap2010:WorkflowViewState.ViewStateManager>
    <sap2010:ViewStateManager>
      <sap2010:ViewStateData Id="Assign_5" sap:VirtualizedContainerService.HintSize="242,62" />
      <sap2010:ViewStateData Id="InvokeMethod_2" sap:VirtualizedContainerService.HintSize="218,130" />
      <sap2010:ViewStateData Id="If_1" sap:VirtualizedContainerService.HintSize="242,51">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">False</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="Sequence_2" sap:VirtualizedContainerService.HintSize="264,277">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="ForEach`1_1" sap:VirtualizedContainerService.HintSize="242,51">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">False</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="Assign_6" sap:VirtualizedContainerService.HintSize="464,62" />
      <sap2010:ViewStateData Id="InvokeMethod_4" sap:VirtualizedContainerService.HintSize="218,130" />
      <sap2010:ViewStateData Id="If_2" sap:VirtualizedContainerService.HintSize="464,280">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="Sequence_4" sap:VirtualizedContainerService.HintSize="486,506">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="ForEach`1_2" sap:VirtualizedContainerService.HintSize="242,51">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">False</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="Assign_7" sap:VirtualizedContainerService.HintSize="242,62" />
      <sap2010:ViewStateData Id="Sequence_1" sap:VirtualizedContainerService.HintSize="264,368">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="MyNet.QueryWorkflows.Operators.Union_1" sap:VirtualizedContainerService.HintSize="304,448" />
    </sap2010:ViewStateManager>
  </sap2010:WorkflowViewState.ViewStateManager>
</Activity>